<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Database Structure</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f3f3f3;
            margin: 0;
            padding: 20px;
        }
        .container {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        .file-group {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .card {
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            width: 200px;
            transition: transform 0.2s ease-in-out;
        }
        .card:hover {
            transform: scale(1.05);
        }
        .card-title {
            background-color: #0078d4; /* MS blue */
            color: #ffffff;
            padding: 10px;
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
            margin: 0;
        }
        .list-group {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        .list-group-item {
            padding: 10px;
            border-bottom: 1px solid #eeeeee;
        }
        .list-group-item:last-child {
            border-bottom: none;
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
        }
        a {
            text-decoration: none; /* 去掉下划线 */
            color: #0078d4; /* MS blue */
            font-weight: bold; /* 加粗 */
            transition: color 0.2s ease; /* 动效 */
        }
        a:hover {
            color: #005a9e; /* 深一点的蓝色 */
        }
    </style>
</head>
<body>
    <div class="container">
        {% for file, classes in database_struct.items() %}
            <div class="file-group">
                {% for class_name in classes %}
                    <div class="card">
                        <h5 class="card-title">{{ file }}</h5>
                        <ul class="list-group">
                            <li class="list-group-item">
                                <a href="/database/{{file}}/{{class_name}}">{{ class_name }}</a>
                            </li>
                        </ul>
                    </div>
                {% endfor %}
            </div>
        {% endfor %}
    </div>
</body>
</html>
